<?php
    $name = pc_variable("name");
    $value = pc_variable("value");
    $errors = pc_variable("errors");
    if($errors !== null && $errors->get($name) !== null) {
        $value = pc_variable("entity." . $name);
    } else {
        $value = $value ? true : false;
    }
?>
<input type="hidden" name="entity.<?php pc_echo($name); ?>" value="false"/>
<input type="checkbox" id="entity.<?php pc_echo($name); ?>" name="entity.<?php pc_echo($name); ?>" value="true"<?php if($value) { ?> checked="checked"<?php } ?>/>
<label for="entity.<?php pc_echo($name); ?>" class="check"><?php pc_echo(pc_message("field." . $name)); ?></label><br/>
